package top.lyc829.aircontroller

import android.annotation.SuppressLint
import android.app.Application
import android.content.Context
import com.xuexiang.xui.XUI
import top.lyc829.aircontroller.logic.utils.SharedPreferencesUtil

class MyApp : Application() {


    // 静态
    companion object {
        @SuppressLint("StaticFieldLeak")
        lateinit var context: Context
        lateinit var sp: SharedPreferencesUtil
        var isLogin:Boolean = false
    }

    override fun onCreate() {
        super.onCreate()
        context = applicationContext
        sp = SharedPreferencesUtil.getSPInstance(context)

        isLogin = !sp.getSP("auth").isNullOrEmpty()


        XUI.init(this)
        XUI.debug(true)

    }

}